5 PRINT"[147]":POKE53280,6:POKE53281,6 10 FOR J=54272 TO 54295:POKE J,0:NEXT:REM CLEAR SOUND CHIP 20 POKE 54275,8:POKE 54296,15:REM SQUARE WAVE, FULL VOLUME, NO ADSR FOR TICK 30 POKE 54273,100:REM SET TICK PITCH. TRY OTHERS 40 INPUT "[147]HOURS";T(1):IF T(1)>12 THEN 40 50 INPUT "MINUTES";T(2):IF T(2)>59 THEN PRINT"[145][145][145]":GOTO 50 60 INPUT "SECONDS";T(3):IF T(3)>59 THEN PRINT"[145][145][145]":GOTO 60 99 REM LINE 100 CALCULATES POKEABLE VALUES FOR 3 TIME-OF-DAY MEMORY REGISTERS 100 FOR I=1 TO 3:H=INT(T(I)/10):L=T(I)-10*H:T(I)=16*H+L:NEXT 110 C=56331:REM TOP OF 4 TOD REGISTERS 120 POKE C,T(1):POKE C-1,T(2):POKE C-2,T(3):REM FILLS TOP THREE REGISTERS 121 REM LINE 120 ANOTHER WAY: FOR I=0 TO 3:POKE C-I,T(I+1):NEXT 130 PRINT "PRESS ANY KEY TO START CLOCK." 140 GET A$:IF A$="" THEN 140 150 PRINT "[147]" 160 POKE C-3,0:REM STARTS CLOCK 169 REM LINES 170-240 FORM LOOP WHICH REPEATEDLY READS THE 4 MEMORY REGISTERS 170 H=PEEK(C):M=PEEK(C-1):S=PEEK(C-2):T=PEEK(C-3):REM READING THE REGISTERS 180 C1$=CHR$((16 AND H)/16+48)+CHR$((15 AND H)+48):REM FORMING HOURS STRING 190 C2$=CHR$((240 AND M)/16+48)+CHR$((15 AND M)+48):REM FORMING MINUTES STRING 200 C3$=CHR$((240 AND S)/16+48)+CHR$((15 AND S)+48):REM FORMING SECONDS STRING 210 IF C3$=C4$ THEN 230:REM IF NOT THE SAME, PRINT TIME & SKIP SOUND SUBROUTINE 220 GOSUB 300:C4$=C3$:REM C3$ <> C4$, THEREFORE SOUND TICK, MAKE C4$=C3$ AGAIN 230 PRINT "TIME IS "C1$+":"+C2$+":"+C3$+":"T"[145]":REM PRINT TIME, CURSOR UP 240 GOTO 170 300 POKE 54276,65:POKE 54276,64:RETURN:REM TURNS SOUND ON AND OFF QUICKLY